﻿<template>
    <div class="hello">
        <van-button type="primary" @click="start">开机</van-button>
    </div>
</template>

<script>
    import axios from 'axios'
import { Notify } from 'vant';
    export default {
        name: 'HelloWorld',
        props: {
            msg: String
        }, methods: {
            start() {
                axios.get("/Start").then(res => {
                    if (res.status == 200) {
                        if (res.data) {
                            Notify("开机成功")
                        } else {
                            Notify("开机失败")
                        }
                    }
                    console.log(res);
                })
            }
        }
    }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
    h3 {
        margin: 40px 0 0;
    }

    ul {
        list-style-type: none;
        padding: 0;
    }

    li {
        display: inline-block;
        margin: 0 10px;
    }

    a {
        color: #42b983;
    }
</style>
